<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" type="text/css"
          href="{{ STATIC_URL }}style/bootstrap.css"/>
    <link rel="stylesheet" type="text/css"
          href="{{ STATIC_URL }}style/malachite.css"/>
</head>
<body>
<div id="content">
    <h1><a href="{{ root_url }}/posts/">Malachite Blog</a></h1>
    {% block content %}
    {% endblock %}
</div>

<script>
    var AjaxQuery = function () {
        "use strict";
        var _req, _ctype = "application/json";

        this.fetch = function (url) {
            var _url = (url) ? url : document.URL;
            _req = new XMLHttpRequest();
            _req.open("GET", _url, true);
            _req.setRequestHeader("Accept", _ctype);
            _req.send();
        };
        this.get_data = function () {
            return JSON.parse(_req.response);
        };
    }
</script>
</body>
</html>